home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
H107.ZIP
/
CLO.ZIP
/
CLO-FI.LSP
Wrap
Lisp/Scheme
|
1991-05-12
|
1KB
|
46 lines
;* CURRENT LAYER OFFSET
;* Provides offsets to current layer.
;* Kent M. Taylor 5/90
;* Revised 4/91
(defun C:CLO ( / ce cl ent side e1 e2 pt1 )
(setq ce (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setq cl (getvar "clayer"))
(setq dist nil
dist (getreal "\nEnter offset distance or RETURN for through point: "))
(while
(setq ent (entsel "\nSelect object to offset: "))
(if ent
(progn
(if (not dist)
(progn
(setq pt1 (getpoint "\nThrough point: "))
(mark)
(command "OFFSET" "T" ent pt1 "")
);progn
(progn
(setq side (getpoint "\nIndicate offset side: "))
(mark)
(command "OFFSET" dist ent side "")
);progn
);if
(setq e2 (entnext e1))
(command "CHANGE" e2 "" "P" "LA" cl "")
);progn
);if
);while
(setvar "cmdecho" ce)
; (setq dist nil)
(princ)
);defun
(princ)
(defun mark ()
(command nil nil nil "POINT" "@") ;place database marker
(setq e1 (entlast)) ;set as last entity
(entdel e1) ;delete
)
(C:CLO)